﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DemoApp
{
    public partial class EmbedCodeDialog : Form
    {
        public EmbedCodeDialog()
        {
            InitializeComponent();
        }

        public void SetCode(string code)
        {
            this.textBox1.Text = code;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(this.textBox1.Text, TextDataFormat.Text);
            MessageBox.Show("Copied!", "Copy", MessageBoxButtons.OK);
        }
    }
}
